Method and apparatus for allocating IP address in wireless communication network

ABSTRACT

A method and apparatus allocates an IP address between terminals in a wireless communication network in which terminals directly communicate with each other in a wireless scheme without an AP. The method for allocating an Internet Protocol (IP) address of a wireless terminal capable of performing P2P communication, includes
         a discovery step of discovering at least one external terminal capable of performing the P2P communication and connecting with the at least one discovered external terminal by the wireless terminal; and a negotiation step of negotiating and determining with the external terminal which external terminals become a group owner and a group client in a P2P group, respectively by the wireless terminal. One of the discovery step and the negotiation step includes transmitting an IP address to be allocated to the group client to the external terminal from the wireless terminal.

CROSS-REFERENCE TO RELATED APPLICATION(S) AND CLAIM OF PRIORITY

The present application is related to and claims the benefit under 35U.S.C. §119(a) of a Korean patent application filed on Feb. 24, 2012 inthe Korean Intellectual Property Office and assigned Serial No.10-2012-0018777, the entire disclosure of which is hereby incorporatedby reference.

TECHNICAL FIELD OF THE INVENTION

The present disclosure relates to a method and an apparatus forallocating an Internet Protocol (hereinafter referred to as ‘IP’)address in a wireless communication network, and more particularly, to amethod for allocating an IP address between terminals in a wirelesscommunication network in which terminals directly communicate with eachother in a wireless scheme without an access point (hereinafter referredto as ‘AP’), and an apparatus thereof.

BACKGROUND OF THE INVENTION

Among wireless communication technologies, a wireless fidelity(hereinafter referred to ‘Wi-Fi’) direct network technology is atechnology which enables Wi-Fi terminals to be connected to each otherin a peer-to-peer (hereinafter referred to as ‘P2P’) fashion without anAP being a medium of an infrastructure network. Most of existing Wi-Fitechnologies are aimed at only connecting with Internet through aWireless Local Area Network (WLAN) AP, consideration of directcommunication between terminals is insufficient. Direct communicationbetween terminals may be achieved by a Bluetooth technology. However,performances in transmission distance and transmission speed sides ofthe Bluetooth technology is deteriorated as compared with the Wi-FiDirect technology.

An existing Wi-Fi technology supports a mode in which directcommunication between terminals is possible, which called an Ad-hocmode. However, since the Ad-hoc mode is disadvantageous in thatsupplement is weak, power consumption is high, and throughput is limitedto 11 Mbps, it is hardly used in actuality.

The Wi-Fi direct technology supports Wi-Fi Protected Access® 2 (WPA2) tosupplement weakness of security. Further, the Wi-Fi Direct technologysupports simple connection between terminals using a Wi-Fi SimpleConfiguration (hereinafter referred to ‘WSC’). Moreover, the Wi-Fidirect technology provides an improved power consumption algorithm bysupporting IEEE 802.11n to significantly improve throughput as comparedwith the Ad-hoc mode.

The Wi-Fi direct technology is a protocol manufactured based on IEEE802.11, and is compatible with a legacy client. The Wi-Fi directtechnology may be upgraded in a terminal without changing hardware.

Although the Wi-Fi direct technology has considerable advantages asillustrated above as compared with the Bluetooth and the Ad-hoctechnology, there is a need for improvement in connection speed betweenterminals. The terminals perform an IP address allocation procedureafter connection between the terminals is completed. That is, since theIP address allocation procedure is further performed after theconnection between the terminals is completed, there is a limitation onimprovement in connection speed. In particular, when one of theterminals is determined as a Group Owner (hereinafter referred to ‘GO’),a corresponding terminal performs an AP function. That is, the GO drivesa Dynamic Host Configuration Protocol (hereinafter referred to ‘DHCP’)server to allocate an IP address to another terminal, namely, a groupclient (hereinafter referred to ‘GC’).

SUMMARY OF THE INVENTION

To address the above-discussed deficiencies of the prior art, it is aprimary object to provide a method for easily and rapidly allocating anIP address between terminals in a wireless communication network, and anapparatus thereof.

In accordance with an aspect of the present disclosure, a method forallocating an Internet Protocol (IP) address of a wireless terminalcapable of performing P2P communication, includes: a discovery step ofdiscovering at least one external terminal capable of performing the P2Pcommunication and connecting with the at least one discovered externalterminal by the wireless terminal; and a negotiation step of negotiatingand determining with the external terminal which external terminalsbecome a group owner and a group client in a P2P group by the wirelessterminal, respectively, wherein one of the discovery step and thenegotiation step includes transmitting an IP address to be allocated tothe group client to the external terminal from the wireless terminal.

In accordance with another aspect of the present disclosure, anapparatus for allocating an Internet Protocol (IP) address of a wirelessterminal capable of performing P2P communication, includes: a Wi-Fimodule for supporting wireless communication based on an IP, and forperforming a function of an access point or a station in the P2Pcommunication; a controller for controlling the Wi-Fi module to transmita frame for discovery of discovering external terminals and connectingwith the at least one discovered external terminal by the wirelessterminal, and a frame for negotiation of negotiating and determiningwith the external terminal which external terminals become a group ownerperforming a function of an access point and a group client performing afunction of a station in a P2P group, respectively, and controlling theWi-Fi module to transmit an IP address to be allocated to the groupclient to the external terminal during the negotiation.

Before undertaking the DETAILED DESCRIPTION OF THE INVENTION below, itmay be advantageous to set forth definitions of certain words andphrases used throughout this patent document: the terms “include” and“comprise,” as well as derivatives thereof, mean inclusion withoutlimitation; the term “or,” is inclusive, meaning and/or; the phrases“associated with” and “associated therewith,” as well as derivativesthereof, may mean to include, be included within, interconnect with,contain, be contained within, connect to or with, couple to or with, becommunicable with, cooperate with, interleave, juxtapose, be proximateto, be bound to or with, have, have a property of, or the like; and theterm “controller” means any device, system or part thereof that controlsat least one operation, such a device may be implemented in hardware,firmware or software, or some combination of at least two of the same.It should be noted that the functionality associated with any particularcontroller may be centralized or distributed, whether locally orremotely. Definitions for certain words and phrases are providedthroughout this patent document, those of ordinary skill in the artshould understand that in many, if not most instances, such definitionsapply to prior, as well as future uses of such defined words andphrases.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present disclosure and itsadvantages, reference is now made to the following description taken inconjunction with the accompanying drawings, in which like referencenumerals represent like parts:

FIG. 1 illustrates a network configuration of a P2P group according toan exemplary embodiment of the present disclosure;

FIG. 2 illustrates a flowchart of a P2P connection method according toan exemplary embodiment of the present disclosure;

FIG. 3 illustrates a flowchart of discovery according to an exemplaryembodiment of the present disclosure;

FIG. 4 illustrates a flowchart of provision discovery according to anexemplary embodiment of the present disclosure;

FIG. 5 illustrates a flowchart of a negotiation procedure according toan exemplary embodiment of the present disclosure;

FIG. 6 illustrates a flowchart of a negotiation procedure according toanother embodiment of the present disclosure;

FIG. 7 illustrates a flowchart of a method for allocating an IPaccording to a first embodiment of the present disclosure;

FIG. 8 illustrates a flowchart of a method for allocating an IPaccording to a second embodiment of the present disclosure;

FIG. 9 illustrates a flowchart of a method for allocating an IPaccording to a third embodiment of the present disclosure;

FIG. 10 illustrates a flowchart of a method for allocating an IPaccording to a fourth embodiment of the present disclosure;

FIG. 11 illustrates a flowchart of a method for allocating an IPaccording to a fifth embodiment of the present disclosure;

FIG. 12 illustrates a diagram of an example of a GO NegotiationConfirmation frame according to an exemplary embodiment of the presentdisclosure;

FIG. 13 illustrates a flowchart of a method for allocating an IPaccording to a sixth embodiment of the present disclosure; and

FIG. 14 illustrates a block diagram of a configuration of a portableterminal according to an exemplary embodiment of the present disclosure.

DETAILED DESCRIPTION OF THE INVENTION

FIGS. 1 through 14, discussed below, and the various embodiments used todescribe the principles of the present disclosure in this patentdocument are by way of illustration only and should not be construed inany way to limit the scope of the disclosure. Those skilled in the artwill understand that the principles of the present disclosure may beimplemented in any suitably arranged system or device.

A method and an apparatus for allocating an IP address according toexemplary embodiments of the present disclosure are described withreference to the accompanying drawings in detail. The same referencenumbers are used throughout the drawings to refer to the same or likeparts. Detailed descriptions of well-known functions and structuresincorporated herein may be omitted to avoid obscuring the subject matterof the present disclosure.

As used herein, the term “terminal” refers to a peer to peer (P2P)device including a Wi-Fi direct technology acting as a GO and a GC in aWi-Fi direct network. As used herein, the term “P2P group” refers to oneterminal set configured by one GO and one or more GCs in the Wi-Fidirect network. The GC is connected to the GO. The GO communicates witha GC, and performs an AP function relaying communication betweenparticularly GCS.

FIG. 1 illustrates a network configuration of a P2P group according toan exemplary embodiment of the present disclosure. Referring to FIG. 1,the GO may connect with a plurality of GCS. The GO may connect with oneGC. The number of admissible clients may be determined according to aperformance of the GO. Such a performance may be a hardware performanceand a software performance, which may be a charging rate of a battery asan example. When a battery of the GO is charged greater than 80%, the GOmay be connected with four GCs as shown. If the charging rate of thebattery is less than 50%, the GO may be connected with one GC. Thenumber of the GCs connected with the GO may be determined by the user inenvironment setting of the terminal. The P2P device is a terminalincluding the Wi-Fi direct technology and may not be variously listed.However, for example, the P2P device may be a portable terminal (e.g.,tablet PC, notebook PC), a printer, a projector, and a digital TV.

FIG. 2 illustrates a flowchart of a P2P connection method according toan exemplary embodiment of the present disclosure. Referring to FIG. 2,a P2P device discovers a neighboring P2P device, and performs connectingwith the discovered P2P device (210). A purpose of the discovery is todiscover P2P devices such that devices may connect with each other assoon as possible. The discovery includes a device discovery and aprovision discovery. The device discovery is configured by two steps,namely, a scan step and a find step. A probe request frame and a proberesponse frame are used in the device discovery to exchange informationbetween the devices. When the P2P device itself is a GO or in a listenstate, the P2P device may respond to a probe request frame received fromanother P2P device. Further, the P2P device itself is a GO and maytransmit a beacon frame. If the P2P device is not included in a group,the P2P device may be in a listen state. That is, the P2P device in thelisten state responds to a received probe request frame.

The P2P device in the listen state selects a listen channel from asocial channel list. For example, according to a Wi-Fi P2P TechnicalSpecification suggested by the Wi-Fi Alliance Technical Committee,channels 1, 6, and 11 may be used as a social channel in 2.4 GHz band.For example, when channel 1 is selected, the P2P device may receive aprobe request frame through the channel 1, but may not receive the proberequest frame through other channels. When the device discovery starts,the listen channel may be selected and remain until the discovery isterminated. If a preset time elapses, the listen channel may be changedto another channel. A 2.4 GHz band is used and there are a total of 14channels in the IEEE 802.11. An interval between channels is 5 MHz, eachhaving a 22 MHz band. The channels are not independent from each otherbut overlap with each other. However, three channels 1, 6, and 11 amongthe 14 channels do not interfere with each other.

The scan step in the device discovery is a step of discovering a P2Pdevice or a P2P group. Further, the scan step is a step of discoveringthe most suitable channel to set the P2P group. That is, in the scanstep, the P2P device scans all supported channels to collect informationfrom a neighboring device or network. In the scan step, the P2P devicemay not respond to a probe request frame.

The find step in the device discovery is a step which P2P devicesexisting in the same channel transceive a message to find each other.The P2P device waits for reception of the probe request frame in thelisten state. When the probe request frame is received, the P2P devicetransmits a probe response frame to a P2P device of the other party. TheP2P device may change the listen state to a discover state. In adiscover state, the P2P device transmits the probe request frame and theP2P device of the other party receives the probe response frame inresponse to the probe request frame. The probe response frame includes adevice name, device attribute information, and vendor information. TheP2P device may display the information such that the user may confirmthe information.

The P2P device discovered for each other through the device discoverymay be connected to each other. First, the P2P device performs provisiondiscovery with a P2P device of the other party wishing connection. Whenthe P2P device attempts connection with a P2P device of the other partyin a Personal Identification Number (PIN) or a Push Button Configuration(PBC) mode of WSC, the provision discovery informs a user of theconnection attempt. The P2P device receives a provision discoveryrequest frame for the provision discovery, and informs the user ofmessage contents through a pop-up. The pop-up includes information ofthe P2P device having requested the provision discovery such as a devicename. The requested use of the P2P device determines presence ofadmittance and a WSC of the connection. To inform the P2P device of theother party of the presence of admittance of the connection, the P2Pdevice transmits a provision discovery response frame to the P2P deviceof the other party.

When the provision discovery is completed, the P2P device negotiates afunction with the P2P device of the other party (220). In thisprocedure, a P2P device determined as the GO perform a function of theAP, and a P2P device determined as a GC perform a function of a station.In particular, in the present disclosure, in this procedure, the GCreceives allocation of an IP address from the GO. The IP address may bea private IP address usable in a local area, namely, a corresponding P2Pgroup. The P2P device stores a private IP address list. For instance,the private IP address may be “165.213.30.2˜254”. P2P devices in the P2Pgroup transceives a massage to determine the GO. In this example, themessage may include a private IP address. That is, the P2P device mayselect an optional private IP address from the private IP address list,and transmits a message including the selected private IP address toanother P2P device. The P2P device determined as a GC from the P2P groupsets a private IP address as the P2P device's IP address.

Negotiation of the function is completed, the P2P device exchangesinformation necessary for P2P communication, for example, a network key,an encryption type, a Service Set Identification (SSID), anAuthentication type with the P2P device of the other party to completeP2P connection (230).

FIG. 3 illustrates a flowchart of discovery according to an exemplaryembodiment of the present disclosure. Referring to FIG. 3, it is assumedthat a first P2P device 310 and a second P2P device 320 participate indiscovery. A user of the first P2P device 310 commands the first P2Pdevice 310 to perform P2P connection (311). That is, the user operatesan input unit included in the first P2P device 310, for example, a touchscreen for P2P connection. Then, the touch screen transfers an inputtouch event to a controller of a device. The controller detects the P2Pconnection, namely, a command of device discovery from the input touchevent. The first P2P device 310 firstly performs scan in response to thecommand of the device discovery (312). For example, the first P2P device310 scans channels 1, 6, and 11 of IEEE 802.11 to collect informationfrom a neighboring P2P device. After completing the scan, the first P2Pdevice 310 performs a find step. Meanwhile, a user of the second P2Pdevice 320 commands the second P2P device 320 to perform the discovery(321). Accordingly, the second P2P device 320 firstly performs scan inresponse to a command of the user (322). After completing the scan, thesecond P2P device 320 performs a find step.

The first P2P device 320 enters a listen state (313). The first P2Pdevice 310 selects channel 1 as the listen channel. If a preset timeelapses, the first P2P device 320 enters a discover state (314). Thefirst P2P device 310 firstly selects channel 1 to transmit a proberequest frame in the discover state. When there is no response, thefirst P2P device 310 selects channel 6 to transmit the probe requestframe. In this example, the second P2P device 320 is in a listen statewith respect to channel 6. Accordingly, the second P2P device 320receives a probe request frame through channel 6, and transmits a proberesponse frame through the channel 6 in response thereto. The first P2Pdevice 310 receives a probe response frame through the channel 6. Thefirst P2P device 310 displays information of the probe response frame,for example, a device name, device attribute information, vendorinformation such that the user may confirm the foregoing information.The user may determine presence of admittance of connection based on theinformation.

FIG. 4 illustrates a flowchart of provision discovery according to anexemplary embodiment of the present disclosure. Referring to FIG. 4, itis assumed that a first P2P device 410 and a second P2P device 420participate in provision discovery. The first P2P device 410 and thesecond P2P device 420 discovered to each other through the devicediscovery may be connected to each other. A user of the first P2P device410 commands the first P2P device 410 to admit connection. For example,the user operates an input unit included in the first P2P device 310,for example, a touch screen for P2P connection. Then, the touch screentransfers an input touch event to a controller of a device. Thecontroller detects admittance of connection, namely, a command of devicediscovery from the input touch event.

The first P2P device 410 firstly transmits a provision discovery requestframe to the second P2P device 420 in response to the command of theprovision discovery (401). In this example, the provision discoveryrequest frame includes an IP address. The IP address in the provisiondiscovery request frame may be a private IP address. Particularly, theprivate IP address included in the provision discovery request frame maybe one of “165.213.30.2-254”.

The second P2P device 420 transmits a provision discovery response frameto the first P2P device 410 in response to reception of the provisiondiscovery request frame (402). In this example, according to the presentdisclosure, the provision discovery response frame may include an IPaddress, namely, a private IP address.

FIG. 5 illustrates a flowchart; of a negotiation procedure according toan exemplary embodiment of the present disclosure. Referring to FIG. 5,the first P2P device 510 and the second P2P device 520 are in a statewhich perform discovery to find each other. The first P2P device 510transmits a GO Negotiation Request frame to the second P2P device 520(510). According to the present disclosure, the GO negotiation requestframe includes a P2P Information Element (IE), WSC information (IE), anIP address.

The IP address of the GO negotiation request frame may be private IPaddress. The IP address of the GO negotiation request frame may be oneof “165.21330.2˜254”.

That is, the first P2P device 510 may optionally select one private IPaddress from a private IP address list, and transmits the GO negotiationrequest frame including the selected private IP address. However, forexample, “165.213.30.2-10” is a share to be allocated to a third P2Pdevice, and may be excluded in the selection. Here, the third P2P deviceis a P2P device requesting entry to a P2P group as a P2P client afternegotiation is completed. That is, a P2P device determined as the GO mayallocate one of the “165.213.30.2˜10” to the third P2P device.

The P2P information of the GO negotiation frame may include deviceinformation, a Configuration Timeout, a Listen Channel, a listen channellist, and a Group Owner Intent (hereinafter referred to as ‘GOI’). Here,the GOI is a numeric value indicating intention of a P2P device, namely,a first P2P device 510 having transmitted a corresponding messagebecoming a GO. That is, when the GOI value is great, there is a greatpossibility which a corresponding P2P device is determined as a GO. Therange of the GOI may previously be set. For example, 0˜15 may be therange of the GOI. A P2P device selects a value from the GOI range basedon the P2P device's performance, in a GO negotiation request frame, andtransmits the GO negotiation request frame including the selected value.For example, when the P2P device receives power supply from a notebookPC and an external commercial power supply, the P2P device may select 15as the GOI.

The second P2P device 520 receives a GO negotiation request frame from afirst P2P device 510, and transmits a GO negotiation response frame inresponse thereto (502). According to the present disclosure, the GOnegotiation response frame includes a P2P Information Element (IE), WSCinformation (IE), and an IP address.

As describe above, an IP address of the GO negotiation response framemay be a private IP address. Particularly, the private IP addressincluded in the GO negotiation response frame may be one of“165.213.30.2˜254”. However, “165.213.30.2˜10” may be omitted because ofthe foregoing reason. P2P information of the GO negotiation responseframe may include device information, a Configuration Timeout, a ListenChannel, a listen channel list, and a GOI.

As described above, the first P2P device 510 and the second P2P device520 exchange the GOI to determine the GO. For example, when the GOIselected by the first P2P device 510 is 10 and the GOI selected by thesecond P2P device 520 is 5, the first P2P device 510 is determined asthe GO and the second P2P device 520 is determined as a GC. Accordingly,the first P2P device 510 performs a function of an AP in a correspondingP2P group, and the second P2P device 520 performs a function of astation in the corresponding P2P group. Further, because the first P2Pdevice 510 is determined as the GO, the second P2P device 520 allocatesan IP address received from the first P2P device 510 as the second P2Pdevice's 520 IP address.

The first P2P device 510 transmits a GO Negotiation Confirmation Frameto the second P2P device 520 to notify that the second P2P device 520 isdetermined as the GC (503).

FIG. 6 illustrates a flowchart of a negotiation procedure according toanother embodiment of the present disclosure. Referring to FIG. 6, thefirst P2P device 610 and the second P2P device 620 are in a state whichperform discovery to find each other. The first P2P device 610 transmitsa GO Negotiation Request frame to the second P2P device 620 (610).According to the present disclosure, the GO negotiation request frameincludes a P2P Information Element (hereinafter referred to as ‘IE’),and WSC IE. The P2P information of the GO negotiation frame may includedevice information, a Configuration Timeout, a Listen Channel, a listenchannel list, and a GOI. Here, the GOI is a numeric value indicatingintention of a P2P device, namely, a first P2P device 610 havingtransmitted a corresponding message becoming a GO. The GOI was describedabove.

The second P2P device 620 receives a GO negotiation request frame from afirst P2P device 610, and transmits a GO negotiation response frame inresponse thereto (602). According to the present disclosure, the GOnegotiation response frame includes a P2P IE and a WSC IE.

As described above, the first P2P device 610 and the second P2P device620 exchange the GOI to determine the GO. For example, the GOI selectedby the first P2P device 610 is greater than that selected by the secondP2P device 620, so that the first P2P device 610 may be determined as aGO. Accordingly, the first P2P device 610 performs a function of an APin a corresponding P2P group, and the second P2P device 620 performs afunction of a station in the corresponding P2P group.

The first P2P device 610 transmits a GO Negotiation Confirmation Framethe second P2P device 620 to notify that the second P2P device 520 isdetermined as the GC (603). In particular, according to the presentdisclosure, the GO Negotiation Confirmation Frame may include an IPaddress. Here, as described above, the IP address may be a private IPaddress. The second P2P device 620 allocates an IP address received fromthe first P2P device 610 determined as the GO as the second P2P device's520 IP address.

Hereinafter, various embodiments of a method for allocating an IPaccording to the present disclosure will be described with reference toFIGS. 7 to 13. It is apparent that a method for allocating an IP addressaccording to the present disclosure is not limited to followingembodiments. Prior to the description, for convenience of thedescription, P2P devices participating in negotiation are limited to afirst P2P device and a second P2P device. It is apparent that a mainbody of the description in FIGS. 7 to 9 is a first P2P device.

FIG. 7 illustrates a flowchart of a method for allocating an IPaccording to a first embodiment of the present disclosure. Referring toFIG. 7, a first P2P device selects a GOI value X₁ from a preset GOIrange (e.g., 0˜15) (701). Further, the first P2P device selects anoptional IP address from a private IP address list (701). The first P2Pdevice transmits the selected GOI value X₁ and IP address to the secondP2P device (702). In this example, the X₁ and IP address may betransmitted to be included in a GO negotiation request frame or a GOnegotiation response frame. The first P2P device receives a GOI value X₂and an IP address from the second P2P device (703). Here, the GOI valueX₂ and IP address are already received, step 703 is omitted.

The first P2P device determines whether the received GOI value X₂ isidentical with the transmitted GOI value X₁ (704). When the received GOIvalue X₂ is identical with the transmitted GOI value X₁, negotiationfails. Accordingly, the first P2P device and the second P2P device mayagain exchange the GOI value. In this example, the IP address may beagain exchanged or not.

When the received GOI value X₂ differs from the transmitted COI valueX₁, the first P2P determines whether the received GOI value X₂ isgreater than the transmitted GOI value X₁ (705). When the received GOIvalue X₂ is greater the transmitted GOI value X₁, the first P2P devicedetermines itself as a GC (706). The first P2P device allocates thereceived IP address as the first P2P device's IP address (707).Accordingly, the first P2P device may perform a function of the station.In the meantime, the second P2P device determines itself as a GO.Accordingly, the second P2P device may perform a function of an AP. Whenthe received GOI value X₂ is less than the transmitted GOI value X₁, thefirst P2P device determines itself as a GO (708). Further, the secondP2P device determines itself as a GC.

FIG. 8 illustrates a flowchart of a method for allocating an IPaccording to a second embodiment of the present disclosure. Referring toFIG. 8, a first P2P device selects a GOI value X₁ from a preset GOIrange (e.g., 0˜15) (801). The first P2P device transmits the selectedGOI value X₁ to the second P2P device (802). In this example, the X₁ maybe transmitted to be included in a GO owner negotiation request frame ora GO negotiation response frame. The first P2P device receives a GOIvalue X₂ from the second P2P device (803). Here, the GOI value X₂ isalready received, step 803 is omitted.

The first P2P device determines whether the received GOI value X₂ isidentical with the transmitted GOT value X₁ (804). When the received GOIvalue X₂ is identical with the transmitted GOI value X₁, negotiationfails. Accordingly, the first P2P device and the second P2P device mayagain exchange the GOT value.

When the received GOI value X₂ differs from the transmitted GOI valueX₁, the first P2P device determines whether the received GOI value X₂ isgreater than the transmitted GOI value X₁ (805). When the received GOIvalue X₂ is greater the transmitted GOI value dX₁, the first P2P devicedetermines itself as a GC (806). After that, the first P2P devicereceives an IP address from the second P2P device, and allocates thereceived IP address as the first P2P device's IP address (807). The IPaddress may be received to be included in the GO negotiationconfirmation frame.

When the received GOI value X₂ is less than the transmitted GOI valueX₁, the first P2P device determines itself as a GO (808).

The first P2P device selects an optional IP address from a private IPaddress list, and transmits the selected IP address to the second P2Pdevice (809).

FIG. 9 illustrates a flowchart of a method for allocating an IPaccording to a third embodiment of the present disclosure. Referring toFIG. 9, a first P2P device selects a GOI value X₁ from a preset GOIrange (e.g., 0˜15) (901). Further, the first P2P device selects anoptional. IP address from a private IP address list (901). In addition,the first P2P device selects a tie break value T₁ (901). Here, the tiebreak is a value used to determine a GO when GOI values collide (areidentical) with each other. The tie break value may be in an ascendingor descending sequence in a preset range. For example, when the firstP2P device preempts ‘0’ as the tie break value, the second P2P devicemay select ‘2’ being a next value as the tie break value.

The first P2P device transmits the selected GOI value tie break valueT₁, and IP address to the second P2P device (902).

In this example, the X₁, T₁, and IP address may be transmitted to beincluded in a GO negotiation request frame or a GO negotiation responseframe. In this example, the T₁ may not be transmitted to be included ina GO negotiation request frame or a GO negotiation response frame. Thatis, the tie break value may not be exchanged between two P2P devices. Inother words, because a P2P device of the two P2P devices havingtransmitted a request frame preempts the tie break value, exchange ofthe tie break value may not be necessary.

The first P2P device receives a GOI value X₂, a tie break value T₂, andan IP address from the second P2P device (903). Here, the GOI value X₂,tie break value T₂, and IP address are already received, step 903 isomitted. A tie break value T₂ may not be received.

The first P2P device determines whether the received GOI value X₂ isidentical with the transmitted GOT value X₁ (904). When the received GOTvalue X₂ differs from the transmitted GOI value X₁, the first P2Pdetermines whether the received GOI value X₂ is greater than thetransmitted GOI value X₁ (905). When the received GOI value X₂ isgreater the transmitted GOI value X₁, the first P2P device determinesitself as a GC (906). Further, the second P2P device determines itselfas a GO. The first P2P device allocates a received IP address as thefirst P2P device's IP address (907).

When the received GOI value X₂ is less than the transmitted GOI valueX₁, the first P2P device determines itself as a GO (908). Further, thesecond P2P device determines itself as a GC.

When the received GOI value X2 is identical with the transmitted GOIvalue X1, the first P2P device determines whether the X1 and X2 are lessthan 15 (here, 15 is a maximum value of the GOI range) (909). When theX1 and X2 are 15, exchange of the GOI value may be again performed.Although both of the X1 and X2 are 15, the process may go to step 910.That is, step 909 may be omitted.

When both, of the X₁ and X₂ are less than 15, the first P2P devicecompares the T₂ with the T₁, and determines a function thereof based onthe comparison result (910). That is, when the T₁ is greater than T₂,the first and second P2P devices may be determined as a GO and a GC,respectively. Conversely, when the first and second P2P devices may bedetermined as a GC and a GO, respectively.

When the first P2P2 device is determined as the GC through thecomparison result of the T₂ with the T₁, the first P2P device allocatesthe received IP address as the first P2P device's IP address (911). Whenthe first P2P device is determined as the GO, step 911 is omitted.

FIG. 10 illustrates a flowchart of a method for allocating an IPaccording to a fourth embodiment of the present disclosure.

Referring to FIG. 10, a first P2P device selects a GOI value X₁ from apreset GOI range (e.g., 0˜15) (1001). Further, the first P2P deviceselects a tie break value T₁ (1001). The tie break value may be in anascending or descending sequence in a preset range.

The first P2P device transmits the selected GOI value X₁ and tie breakvalue T₁ to the second P2P device (1002). In this example, the X₁ and T₁may be transmitted to be included in a GO negotiation request; frame ora GO negotiation response frame. In this example, the T₁ may not betransmitted to be included in a GO negotiation request frame or a GOnegotiation response frame. That is, the tie break value may not beexchanged between two P2P devices.

The first P2P device receives a GOI value X₂ and a tie break value T₂from the second P2P device (1003). Here, the GOI value X₂ and the tiebreak value T₂ are already received, step 1003 is omitted. A tie breakvalue T₂ may not be received.

The first P2P device determines whether the received GOI value X₂ isidentical with the transmitted GOI value X₁ (1004). When the receivedGOI value X₂ differs from the transmitted GOI value X₁, the first P2Pdetermines whether the received GOI value X₂ is greater than thetransmitted GOI value X₁ (1005). When the received GOI value X₂ isgreater the transmitted GOI value X₁, the first P2P device determinesitself as a GC (1006). Further, the second P2P device determines itselfas a GO. The first P2P device receives an IP address from the second P2Pdevice and allocates a received IP address as the first P2P device's IPaddress (1007). The IP may be received to be included in a GOnegotiation confirmation frame.

When the received GOI value X₂ is less than the transmitted GOI valueX₁, the first P2P device determines itself as a GO (1008). Further, thesecond P2P device determines itself as a GC. Further, the first P2Pdevice selects an optional IP address from a private IP address list andtransmits the selected IP address to the second P2P device (1009).

When the received GOI value X₂ is identical with the transmitted GOIvalue X₁, the first P2P device determines whether the X₁ and X₂ are lessthan 15 (here, 15 is a maximum value of the GOI range) (1010) When theX₁ and X₂ are 15, exchange of the GOI value may be again performed.Although both of the X₁ and X₂ are 15, the process may go to step 1011.That is, step 1010 may be omitted.

When both of the X₁ and X₂ are less than 15, the first P2P devicecompares the T₂ with the T₁, and determines a function thereof based onthe comparison result (1011). That is, when the T₁ is greater than T₂,the first and second P2P devices may be determined as a GO and a GC,respectively. Conversely, when the first and second P2P devices may bedetermined as a GC and a GO, respectively.

When the first P2P2 device is determined as the GC through thecomparison result of the T₂ with the T₁, the first P2P device allocatesthe received IP address as the first P2P device's IP address (1012).Meanwhile, when the first P2P device is determined as the GO, the firstP2P device selects an optional IP address from a private IP address listand transmits the selected optional IP address to the second P2P device(1012).

FIG. 11 illustrates a flowchart of a method for allocating an IPaccording to a fifth embodiment of the present disclosure. Referring toFIG. 11, a first P2P device selects a GOI value X₁ from a preset GOIrange (e.g., 0˜15) (1101). The first P2P device transmits the selectedGOT value X₁ to the second P2P device (1102). In this example, the X₁may be transmitted to be included in a GO negotiation request frame or aGO negotiation response frame. The first P2P device receives a GOI valueX₂ from the second P2P device (1103) Here, the GOI value X₂ is alreadyreceived, step 1103 is omitted.

The first P2P device determines whether the received GOI value X₂ isidentical with the transmitted GOI value X₁ (1104). When the receivedGOI value X₂ is identical with the transmitted GOI value X₁, the firstP2P device and the second P2P device may again exchange the GOI value.

When the received GOI value X₂ differs from the transmitted GOI valueX₁, the first P2P determines whether the received GOI value X₂ isgreater than the transmitted GOI value X₁ (1105). When the received GOIvalue X₂ is greater the transmitted GOI value X₁, the first P2P devicedetermines itself as a GC (1106). After that, the first P2P devicereceives an IP address from the second P2P device, and allocates thereceived IP address as the first P2P device's IP address (1107). Here,the IP address is received from the second P2P device through provisiondiscovery. Meanwhile, the second P2P device determines itself as a GO.

When the received GOI value X₂ is less than or equal to the transmittedGOI value X₁, the first P2P device determines itself as a GO (1108).Further, the second P2P device determines itself as a GC.

FIG. 12 illustrates a diagram of an example of a GO NegotiationConfirmation frame according to an exemplary embodiment of the presentdisclosure. Referring to FIG. 12, a GO negotiation confirmation framemay include a vendor specific 1210. Further, the vendor specific 1210may include a private IP address 1020, for instance, “165.213.30.23”.That is, the P2P device may select one from “165.213.30.2˜254” andincludes the selected IP address in a GO negotiation confirmation frame,and transmit the GO negotiation confirmation frame to a P2P device ofthe other party. The P2P device may include the selected IP address in aGO negotiation request frame or a GO owner negotiation response frame,and the corresponding to the P2P device of the other party. For example,“165.213.30.2˜10” is a share to be allocated to a third P2P device, andmay be excluded in the selection.

FIG. 13 illustrates a flowchart of a method for allocating an IPaccording to a sixth embodiment of the present disclosure. Referring toFIG. 13, a first P2P device 1310 is in a state completing connectionwith a second P2P device (not shown) through discovery and negotiationprocedures. Further, the first P2P device 1310 is in a state determinedas a GO in the negotiation procedure. Further, the first P2P device 1310and a third P2P device 1320 are in a state discovered through the devicediscovery. The third P2P device 1320 transmits a provision discoveryrequest frame to the first P2P device 1310 in this state (1301). Thefirst P2P device 1310 transmits a provision discovery response frame tothe third P2P device 1320 in response to reception of the provisiondiscovery request frame (1302). In this example, according to thepresent disclosure, the provision discovery response frame may includean IP address, particularly, a private IP address. The third P2P device1320 allocates the received IP address as the third P2P device's IPaddress and participates in a P2P group in which the first P2P device1310 is a GO.

As described above, the P2P device according to the present disclosureis applicable of electronic device in the various forms. In particular,the P2P device of the present disclosure is applicable to a portableterminal. It will be apparent that the portable terminal is applicableto various information and communication devices and multi-media devicesuch as a portable phone, a smart phone, a tablet PC, a net book PC, anotebook PC, a Portable Multimedia Player (PMP), an electronic book(e-book) reader, a Personal Digital Assistant (PDA), a digitalbroadcasting player, a music player (e.g., MP3 player), a portable gameterminal, and application devices thereof.

FIG. 14 illustrates a block diagram of a portable terminal according toan exemplary embodiment of the present disclosure. Referring to FIG. 14,a portable terminal 1400 according to the present disclosure may includea touch screen 1410, a key input unit 1420, a display unit 1430, amemory 1440, a radio frequency (RF) communication unit 1450, and acontroller 1460.

The touch screen 1410 is mounted in front of the display unit 1430,generates a touch event in response to a user gesture input to the touchscreen 1410, and transfers the generated touch event to the controller1460. Accordingly, the controller 1460 may detect the touch event inputfrom the touch screen 1410 to control the foregoing components.

The key input unit 1420 may include a plurality of input keys andfunction keys for receiving input of numerals and character informationand for setting various functions. The key input unit 1420 generates andtransfers a key signal associated with user setting and function controlof the portable terminal 1400 to the controller 1460. The controller1460 controls the foregoing components in response to the key signal.

The display unit 1430 converts image data input from the controller 1460into an analog signal, and displays the analog signal under control ofthe controller 1460. That is, the display unit 1430 may provide variousscreens according to use of the portable terminal, for example, a lockscreen, a home screen, an application execution screen, a menu screen, akeypad screen a message creation screen, and an Internet screen. Thedisplay unit 1430 may be configured by a flat panel display such as aLiquid Crystal Display (LCD), an Organic Light Emitted Diode (OLED), oran Active Matrix Organic Light Emitted Diode (AMOLED).

The memory 1440 may store an operating system (OS), applicationsnecessary for the disclosure, and various data. The memory 1440 maychiefly include a program area and a data area. The data area of thememory 140 may store data generated by the portable terminal 1400 ordata downloaded from the outside, namely, images, documents, video,messages, mails, music, and effect sounds. Further, the data area maystore the screen displayed on the display unit 1430. Moreover, the dataarea may temporarily store data which the user copies messages,photographs, web pages, or documents for copy and paste. In addition,the data area may store various setting values (e.g., screen brightness,presence of vibration when a touch occurs, presence of automaticrotation of a screen) for operating the portable terminal. Further, thedata area may include a private IP address list 1441. The program areaof the memory 1440 may store an operating system (OS) for booting theportable terminal and the foregoing components, and variousapplications. In particular, the program area stores programs associatedwith an operation and control of a Wi-Fi direct terminal such as devicediscovery, provision discovery, and negotiation.

The RF communication unit 1450 performs a voice call, an image call ordata communication under control of the controller 1460. To do this, theRF communication unit 1450 may include an RF transmitter up-converting afrequency of a transmitted signal and amplifying the signal and an RFreceiver low-noise-amplifying a received signal and down-converting thesignal. Further, the RF communication unit 1450 may include mobilecommunication modules (e.g., a 3-Generation mobile communication module,a 3.5-Generation mobile communication module, or a 4-Generation mobilecommunication module, etc.) and a Wi-Fi module.

The Wi-Fi module 1451 supports wireless communication based on an IP ofthe portable terminal 1400. In the present disclosure, the Wi-Fi module1451 performs a function of an AP or a station under control of thecontroller 1460. In other words, the Wi-Fi module 1451 acts as a GO or aGC under control of the controller 1460.

The Wi-Fi module 1451 performs device discovery, provision discovery,and negotiation. Particularly, the Wi-Fi module 1451 may include an IPaddress in a Provision Discovery Request Frame, a Provision DiscoveryResponse Frame, a GO Negotiation Request Frame, a GO NegotiationResponse Frame, or a GO Negotiation Configuration Frame, and transmitthe corresponding frame under control of the controller 1460. Further,the Wi-Fi module 1451 may receive the IP address included in theProvision Discovery Request Frame, the Provision Discovery ResponseFrame, the GO Negotiation Request Frame, the GO Negotiation ResponseFrame, or the GO Negotiation Configuration Frame, and transfer thereceived IP address to the controller 1460.

The controller 1460 controls an overall operation of the portableterminal 1400, signal flow between internal components of the portableterminal 1400, and processes data. Further, the controller 1460 controlspower supply to the internal components in a battery. Moreover, thecontroller 1460 executes various applications stored in the programarea.

The controller 1460 may receive an event from the touch screen 1410 orthe key input unit 1420, and detect command of the discovery from thereceived event. The controller 1460 controls the Wi-Fi module 1451 toperform the device discovery in response to the command of devicediscovery. The controller 1460 controls the Wi-Fi module 1451 to performthe provision discovery in response to the command of the provisiondiscovery.

The controller 1460 may select a private IP address to be transmittedfrom a private IP address list 1441, and control the Wi-Fi module 1451to transmit the selected private IP address. The controller 1460 mayreceive the private IP address from an external device, namely, a P2Pdevice through the Wi-Fi module 1451. As a negotiation result, when theportable terminal 1400 is determined as a GC, the controller 1460allocates the received private IP address as an IP address of theportable terminal 1400, and operates the Wi-Fi module 1451 as a GC. As anegotiation result, when the portable terminal 1400 is determined as aGO, the controller 1460 operates the Wi-Fi module 1451 as a GO.

Meanwhile, although the structural elements can be variously changedaccording to convergence trend of a digital device, no elements can belisted. However, the portable terminal 1400 may further includeconstructions that are not mentioned such as a digital broadcastingmodule (e.g., DMB module), a GPS module, and a camera module. Theterminal 1400 of the present disclosure may be substituted by specificconstructions in the foregoing arrangements according to the providedform.

The foregoing method for allocating an Internet Protocol address of thepresent disclosure may be implemented in an executable program commandform by various computer means and be recorded in a computer readablerecording medium. In this example, the computer readable recordingmedium may include a program command, a data file, and a data structureindividually or a combination thereof. In the meantime, the programcommand recorded in a recording medium may be specially designed orconfigured for the present disclosure or be known to a person havingordinary skill in a computer software field to be used. The computerreadable recording medium includes Magnetic Media such as hard disk,floppy disk, or magnetic tape, Optical Media such as Compact Disc ReadOnly Memory (CD-ROM) or Digital Versatile Disc (DVD), Magneto-OpticalMedia such as optical disk, and a hardware device such as ROM. RAM,flash memory storing and executing program commands. Further, theprogram command includes a machine language code created by a complierand a high-level language code executable by a computer using aninterpreter. The foregoing hardware device may be configured to beoperated as at least one software module to perform an operation of thepresent disclosure.

The present disclosure provides a method for easily and rapidlyallocating an IP address between terminals in a wireless communicationnetwork, and an apparatus thereof. The present disclosure can allocatean IP address without driving a DHCP server. Therefore, connection speedand usability between terminals are improved.

Although a method and apparatus for allocating an IP address accordingto exemplary embodiments of the present disclosure have been describedin detail hereinabove, it should be clearly understood that manyvariations and modifications of the basic inventive concepts hereintaught which may appear to those skilled in the present art will stillfall within the spirit and scope of the present disclosure, as definedin the appended claims.

What is claimed is:
 1. A method of operating a wireless terminal forallocating an Internet Protocol (IP) address for peer-to-peer (P2P)communication, the method comprising: discovering, by the wirelessterminal, at least one external terminal capable of performing the P2Pcommunication; connecting, by the wireless terminal with the at leastone discovered external terminal; and negotiating and determining, bythe wireless terminal, with the at least one discovered externalterminal which of the at least one discovered external terminal and thewireless terminal become a group owner and a group client (GC) in a P2Pgroup, wherein one of the discovering and the negotiating includestransmitting to the at least one discovered external terminal, by thewireless terminal, an IP address to be allocated to the GC.
 2. Themethod of claim 1, wherein the negotiating comprises: exchanging a frameincluding a first group owner intent value indicating intention of thewireless terminal becoming the group owner and the IP address with theat least one discovered external terminal by the wireless terminal;transmitting a group owner negotiation confirmation frame indicatingthat the wireless terminal is determined as a group owner by thewireless terminal when the first group owner intent value transmittedfrom the wireless terminal is greater than a second group owner intentvalue received from the at least one discovered external terminal; andallocating an IP address from the at least one discovered externalterminal as an IP address of the wireless terminal by the wirelessterminal when the first group owner intent value transmitted from thewireless terminal is less than the second group owner intent value. 3.The method of claim 2, wherein the frame includes a group ownernegotiation request frame or a group owner negotiation response frame.4. The method of claim 2, wherein exchanging the frame comprises:selecting one group owner intent value from a preset group owner intentrange by the wireless terminal; selecting one private IP address from aprivate IP address list by the wireless terminal; transmitting a groupowner negotiation request frame including the selected group ownerintent value and the one selected private IP address to the at least onediscovered external terminal by the wireless terminal; and receiving agroup owner negotiation response frame from the at least one discoveredexternal terminal by the wireless terminal, wherein the group ownernegotiation response frame is a frame including a group owner intentvalue and a private IP address that the at least one discovered externalterminal transmits in response to the group owner negotiation requestframe.
 5. The method of claim 1, wherein the discovering comprises:selecting one private IP address from a private IP address list by thewireless terminal; transmitting a provision discovery request frameincluding the one selected private IP address to the at least onediscovered external terminal by the wireless terminal; and receiving aprovision discovery response frame from the at least one discoveredexternal terminal by the wireless terminal, wherein the provisiondiscovery response frame is a frame including a private IP address thatthe at least one discovered external terminal transmits in response tothe provision discovery response frame.
 6. The method of claim 5,wherein the negotiating comprises: exchanging a frame including a firstgroup owner intent value indicating intention of the wireless terminalbecoming the group owner as a numeric value with the at least onediscovered external terminal by the wireless terminal; when the firstgroup owner intent value transmitted from the wireless terminal isgreater than a second group owner intent value received from the atleast one discovered external terminal, transmitting a group ownernegotiation confirmation frame indicating that the wireless terminal isdetermined as a group owner to the at least one discovered externalterminal by the wireless terminal; and when the first group owner intentvalue transmitted from the wireless terminal is less than the secondgroup owner intent value received from the at least one discoveredexternal terminal, allocating an IP address received from the wirelessterminal during the discovering as an IP address of the wirelessterminal.
 7. The method of claim 1, wherein transmitting the IP addresscomprises transmitting a group owner negotiation confirmation frameindicating that the wireless terminal is determined as a group ownerincluding the IP address to the at least one discovered externalterminal determined as the GC when the wireless terminal is determinedas the group owner.
 8. The method of claim 1, further comprising:receiving a provision discovery request frame from a third externalterminal after the wireless terminal is determined as the group owner;and transmitting a provision discovery response frame including an IPaddress to the third external terminal by the wireless terminal inresponse to reception of the provision discovery request frame.
 9. Themethod of claim 1, wherein the IP address includes a private IP addressselected from a private IP address list stored in the wireless terminal.10. An apparatus of a wireless terminal for allocating an InternetProtocol (IP) address for peer-to-peer (P2P) communication, theapparatus comprising: a Wi-Fi module configured to support wirelesscommunication based on an IP address, and perform a function of anaccess point or a station in the P2P communication; a controllerconfigured to control the Wi-Fi module to: transmit a frame fordiscovery of external terminals and connection with at least onediscovered external terminal, transmit a frame for negotiation ofnegotiating and determining with the at least one external terminalwhich of the at least one external terminal and the wireless terminalbecome a group owner performing a function of an access point and whichbecome a group client (GC) performing a function of a station in a P2Pgroup, and transmit to the external terminal an IP address to beallocated to the GC during the negotiation.
 11. The apparatus of claim10, wherein the controller is configured to select a private IP addressto be transmitted from a private IP address list, and control the Wi-Fimodule to transmit the selected private IP address to the at least oneexternal terminal.
 12. The apparatus of claim 11, wherein the controlleris configured to allocate a private IP address received from the atleast one external terminal as an IP address of the wireless terminal,and operate the Wi-Fi module as the GC when the wireless terminal isdetermined as the GC as a result of the negotiation.
 13. The apparatusof claim 12, wherein the controller is configured to operate the Wi-Fimodule as the group owner when the wireless terminal is determined asthe group owner as the negotiation result.
 14. The apparatus of claim13, wherein the controller is configured to: control the Wi-Fi modulesuch that the wireless terminal exchanges a frame including a firstgroup owner intent value indicating intention of the wireless devicebecoming the group owner and the IP address with the at least oneexternal terminal, determine the wireless terminal as the group ownerwhen the first group owner intent value transmitted from the wirelessterminal is greater than a second group owner intent value received fromthe at least one external terminal, control the Wi-Fi module to transmita group owner negotiation confirmation frame indicating that thewireless terminal is determined as the group owner to the at least oneexternal terminal, and allocate an IP address received from the externalterminal as an IP address of the wireless terminal when the first groupowner intent value is less than the second group owner intent value. 15.The apparatus of claim 14, wherein the controller is configured to:select one group owner intent value from a preset group owner intentrange and select one private IP address from a private IP address list,and control the Wi-Fi module to transmit a group owner negotiationrequest frame including the selected group owner intent value and theone selected private IP address to the at least one external terminal.16. The apparatus of claim 13, wherein the controller is configured to:select one private IP address from a private IP address list, controlthe Wi-Fi module to transmit a provision discovery request frameincluding the one selected private IP address to the at least oneexternal terminal, and control the Wi-Fi module to receive a provisiondiscovery response frame from the at least one external terminal,wherein the provision discovery response frame is a frame including aprivate IP address which the at least one external terminal transmits inresponse to the provision discovery request frame.
 17. The apparatus ofclaim 16, wherein the controller is configured to: control the Wi-Fimodule to exchange a frame including a first group owner intent valueindicating intention of the wireless terminal becoming the group owneras a numeric value with the at least one external terminal, determinethe wireless terminal as a group owner when the first group owner intentvalue transmitted from the wireless terminal is greater than a secondgroup owner intent value received from the at least one externalterminal, and allocate an IP address received from the wireless terminalas an IP address of the wireless terminal when the first group ownerintent value transmitted from the wireless terminal is less than thesecond group owner intent value received from the at least one externalterminal.
 18. The apparatus of claim 13, wherein the controller isconfigured to control the Wi-Fi module to transmit a group ownernegotiation confirmation frame indicating that the wireless terminal isdetermined as a group owner including the IP address to the at least oneexternal terminal determined as the GC when the wireless terminal isdetermined as the group owner.
 19. The apparatus of claim 13, whereinthe controller is configured to control the Wi-Fi module to transmit aprovision discovery response frame including an IP address to a thirdexternal terminal when receiving a provision discovery request framefrom the third external terminal after the wireless terminal isdetermined as the group owner.
 20. A method for allocating an InternetProtocol (IP) address of a wireless terminal capable of performingpoint-to-point (P2P) communication, the method comprising: discovering,by the wireless terminal, at least one external terminal capable ofperforming the P2P communication and connecting with the at least onediscovered external terminal; sending, by the wireless terminal, a frameincluding a first group owner intent value indicating intention of thewireless terminal to become a group owner and the IP address of thewireless terminal to the at least one external terminal; transmitting,by the wireless terminal, a group owner negotiation confirmation frameindicating that the wireless terminal is determined as the group ownerwhen the first group owner intent value is greater than a second groupowner intent value received from the at least one external terminal; andallocating, by the wireless terminal, an IP address from the at leastone external terminal as the IP address of the wireless terminal whenthe first group owner intent value is less than the second group ownerintent value.
 21. A method for allocating an Internet Protocol (IP)address of a wireless terminal capable of performing point-to-point(P2P) communication, the method comprising: discovering, by the wirelessterminal, at least one external terminal capable of performing the P2Pcommunication and connecting with the at least one discovered externalterminal; sending, by the wireless terminal, a frame including a firstgroup owner intent value indicating intention of the wireless terminalto become a group owner to the at least one external terminal;including, by the wireless terminal, an IP address in a group ownernegotiation confirmation frame indicating that the wireless terminal isdetermined as a group owner and transmitting the group owner negotiationconfirmation frame to the at least one external terminal when the firstgroup owner intent value is greater than a second group owner intentvalue received from the at least one external terminal; and receiving,by the wireless terminal, a group owner negotiation confirmation frameincluding an IP address from the at least one external terminal when thefirst group owner intent value transmitted from the wireless terminal isless than or equal to the second group owner intent value and allocatingthe received IP address as the IP address of the wireless terminal. 22.An apparatus for allocating an Internet Protocol (IP) address of awireless terminal capable of performing point-to-point (P2P)communication, the apparatus comprising: a Wi-Fi module configured tosupport wireless communication based on an IP address, and perform afunction of an access point or a station in the P2P communication; amemory configured to store a private IP address list; a controllerconfigured to control the Wi-Fi module and the memory, wherein thecontroller is configured to: discover at least one external terminal andconnect the wireless terminal with the at least one discovered externalterminal, select an IP address from the private IP address list, controlsuch that a frame including a first group owner intent value and theselected IP address is transmitted to the at least one discoveredexternal terminal, control such that a frame including a second groupowner intent value and an IP address is received, control such that agroup owner negotiation confirmation frame is transmitted to the atleast one discovered external terminal when the first group owner intentvalue is greater than the second group owner intent value, and allocatethe received IP address as the IP address of the wireless terminal whenthe first group owner intent value is less than the second group ownerintent value.
 23. An apparatus for allocating an Internet Protocol (IP)address of a wireless terminal capable of performing point-to-point(P2P) communication, the apparatus comprising: a Wi-Fi module configuredto support wireless communication based on an IP address, and perform afunction of an access point or a station in the P2P communication; amemory configured to store a private IP address list; a controllerconfigured to control the Wi-Fi module and the memory, wherein thecontroller is configured to: discover at least one external terminal andconnect the wireless terminal with the at least one discovered externalterminal, control such that a frame including a first group owner intentvalue is transmitted to the at least one discovered external terminal,select an IP address from the private IP address list and control suchthat a frame including the selected IP address is transmitted to the atleast one discovered external terminal when the first group owner intentvalue is greater than a second group owner intent value received fromthe at least one discovered external terminal, control such that a groupowner negotiation confirmation frame including an IP address is receivedfrom the at least one discovered external terminal when the first groupowner intent value is less than the second group owner intent value, andallocate the received IP address as an IP address of the wirelessterminal.